import { post,get } from "./localService"; 

export const login =  (data:any) => get({  url:"/mock/login.json" })
export const logOut =  (token:string) => get({ url:"/mock/logout.json" })

export const getToken =  (data:any) => get({ url:"/mock/mytoken.json"  })

export const getUserList= () =>{
    return get({
        url:"/mock/userlist.json"
    })
}
 

export const getAddressDetail= async (id:number) =>{
    const list= await get({url:"/mock/address.json" }); 
    return list.data&&list.data[0];  
}
 

export const getAddressList= () =>{
    return get({
        url:"/mock/address.json"
    })
}
 


export const getExcelOutJson =  () => get({ url:"/mock/excelOut.json"  })